<template>
  <div>
    <headers></headers>
        <van-row>
            <van-col span="5">
              <left/>
            </van-col>
            <van-col span="19">
              <van-field label="标题" v-model="form.title"/>
              <van-field label="内容" v-model="form.content"/>
              <van-button @click="fb">发布</van-button>
              <van-button to="addprize" text="去添加奖品"/>
              <van-button to="fictionpass" text="去审核"/>
              <van-button to="fictionaudit" text="查看审核过程"/>
            </van-col>
         </van-row>
  </div>
</template>

<script>
import maxios from "@/http/axios";
import headers from '../comm/headers.vue'
import left from '../comm/left.vue'
export default {
  components:{
        'headers':headers,
        'left':left,
    },
  data() {
    return {
      form:{},
      userid:localStorage.getItem('userid')
    }
  },
  methods:{
    fb(){
      maxios('addessay?userid='+this.userid,'post',this.form).then(res=>{
        if(res.code==200){
          alert('发布成功等待审核')
        }else {
          alert('抱歉出错了')
        }
      })
    }
  }
}
</script>

<style scoped>

</style>